import request from '@/utils/request'


//预警列表
export function getwarningsList(params) {
  return request({
    url: '/ins/warning/warnings',
    method: 'get',
    params
  })
}
//填写处理结果
export function fillDeal(params) {
  return request({
    url: '/ins/warning/deal',
    method: 'post',
    params
  })
}
//查询预警商家信息
export function judicialDetail(merchantId) {
  return request({
    url: `/ins/warning/detail/${merchantId}`,
    method: 'get',
  })
}

//查询预警信息统计
export function riskCount(merchantId) {
  return request({
    url: `/ins/warning/riskCount/${merchantId}`,
    method: 'get',
  })
}

// 查询司法风险
export function judicialRisk(merchantId) {
  return request({
    url: `/ins/warning/judicialRisk/${merchantId}`,
    method: 'get',
  })
}
// 查询经营风险
export function operationRisk(merchantId) {
  return request({
    url: `/ins/warning/operationRisk/${merchantId}`,
    method: 'get',
  })
}
// 查询法人风险
export function legalPersonRisk(merchantId) {
  return request({
    url: `/ins/warning/legalPersonRisk/${merchantId}`,
    method: 'get',
  })
}
// 预警设置 参数配置表 获取
export function getGovConfig(params) {
  return request({
    url: '/ins/warning/getGovConfig',
    method: 'get',
    params
  })
}

//预警设置 参数配置表 修改
export function setGovConfig(data) {
  return request({
      url: `/ins/warning/setGovConfig`,
      method: 'post',
      data
  })
}
